﻿int[] arr = new int[10];//10维数组
Console.WriteLine("请输入第1个数");
arr[0] = int.Parse(Console.ReadLine());
//历列
for (int a = 0; a < 10; a++)
    Console.Write(arr[a] + "\t");
Console.WriteLine("");
for (int i = 0;i<9;i++)
{
    Console.WriteLine("请输入第" +( i + 2) + "个数");
    int num = int.Parse(Console.ReadLine());
    int j = 0;
    bool isSmaller = false; 
    //判断大小排序
    while (i - j >= 0&&num < arr[i - j])//小者
    {
        arr[i - j + 1] = arr[i - j];
        arr[i - j] = num;
        j++;
        isSmaller = true;
    }
    while(isSmaller == false&&num >= arr[i-j])//大者
    {
        arr[i + 1] = num;
        break;
    }
    //遍历
    for (int a = 0; a < 10; a++)
        Console.Write(arr[a]+"\t");
    Console.WriteLine("");
}
